<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
        content="width=device-width, initial-scale=1.0">
<meta name="HandheldFriendly" content="true">
<title>Sample</title>
</head>
<body>
<script>
var appCache = window.applicationCache;

switch (appCache.status) {
  case appCache.UNCACHED: // UNCACHED == 0
    alert( 'UNCACHED');
    break;
  case appCache.IDLE: // IDLE == 1
    alert( 'IDLE');
    break;
  case appCache.CHECKING: // CHECKING == 2
    alert ('CHECKING');
    break;
  case appCache.DOWNLOADING: // DOWNLOADING == 3
    alert( 'DOWNLOADING');
    break;
  case appCache.UPDATEREADY:  // UPDATEREADY == 5
    alert ('UPDATEREADY');
    break;
  case appCache.OBSOLETE: // OBSOLETE == 5
    alert ('OBSOLETE');
    break;
  default:
    alert ('UKNOWN CACHE STATUS');
    break;
};

</script>
</body>
</html>
